#!/usr/bin/env python
# coding: utf-8

# In[1]:


"""企业利润奖金提成"""

p = float(input("请输入当月利润I(万元)："))
m = 0 
if p <= 10:
    m = p * 0.1
elif 10 < p <= 20:
    m = 10 * 0.1 + (p - 10) * 0.075
elif 20 < p <= 40:
    m = 10 * 0.1 + 10 * 0.075 +(p - 20) * 0.05
elif 40 < p <= 60:
    m = 10 * 0.1 + 10 * 0.075 + 20 * 0.05 + (p - 40) * 0.03
elif 60 < p <= 100:
    m = 10 * 0.1 + 10 * 0.075 + 20 * 0.05 + 20 * 0.03 + (p - 60) * 0.015
elif p > 100:
    m = round(10 * 0.1 + 10 * 0.075 + 20 * 0.05 + 20 * 0.03 + 40 * 0.015 + (p - 100) * 0.01,4)
else:
    pass
print('当月奖金为%s万元' % m)


# In[2]:


"""企业利润奖金提成"""
# 使用list分级简化处理

p = float(input("请输入当月利润I(万元)："))
m = 0 
# 当月利润 p和奖金提成 m
x =[100,60,40,20,10,0]
y =[0.01,0.015,0.03,0.05,0.075,0.1]
# 利润分级及对应的提成比例

for i in range(6):
    if p > x[i]:
        m = m + (p - x[i]) * y[i]
        # 奖金在 x[i] 档的超出部分提成计算
        p = x[i]
        # 未超出部分继续循环
        
print('当月奖金为%s万元' % m)


# In[ ]:




